package javafoundations;

public class ArrayStacktest {
    public static void main(String []args)
    {
        ArrayStack stack = new ArrayStack();

        System.out.println("Is the stack empty? "+stack.isEmpty());

        stack.push(2000);
        stack.push(1029);
        stack.push("lyj");
        stack.push(20182326);

        System.out.println("The length of the Stack is "+stack.Size());

        System.out.println(stack.peek());
        int a =stack.Size();
        for(int i = 1;i<=a ;i++) {
            System.out.println("the"+ (a-i+1) +"stack is"+stack.pop());
        }

        System.out.println(stack.toString());
    }
}
